package com.minigame.repository.ext;

import com.minigame.repository.ext.filter.IDataFilter;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.NoRepositoryBean;

import java.io.Serializable;
import java.util.List;

@NoRepositoryBean
public interface IMultiCacheRepository<T,ID extends Serializable,BusID extends Serializable> extends JpaRepository<T,ID> {

    List<T> cacheLoadList(BusID busID);

    List<T> cacheLoadList(BusID busID, IDataFilter<T> dataFilter);

    T cacheLoad(BusID busID,ID id);

    void cacheInsert(BusID busID,T t);

    void cacheUpdate(BusID busID,T t);

    void cacheDelete(BusID busID,ID id);

    void cacheBatchDelete(BusID busID);



}
